Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow degenerate triangles #2434

Merged
merged 12 commits into from
Jul 30, 2024
Merged

Allow degenerate triangles #2434

merged 12 commits into from
Jul 30, 2024

Conversation

hannobraun
Copy link
Owner

Requiring triangles to be valid on construction is too restrictive. In fact, I'm working on some code (for #2118) that would benefit from degenerate triangles being possible to represent.

The method doesn't make sense yet, as `Triangle::new` explicitly forbids
degenerate triangles. This is about to change though, and adding this
method is preparation for that.
This check is currently redundant with what the `Triangle` constructor
already does. The constructor will soon get simplified though, and then
the new check will be necessary.
Degenerate triangles are actually useful in some cases, and I'm actually
working on some code that needs them. Thus, the constructor as it was,
was too restrictive.
With the constructor no longer preventing degenerate triangle, there's
no reason to keep it private.
With the `points` field public, it has become redundant.
@hannobraun hannobraun enabled auto-merge July 30, 2024 16:40
@hannobraun hannobraun merged commit d1d730a into main Jul 30, 2024
3 checks passed
@hannobraun hannobraun deleted the triangle branch July 30, 2024 16:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant